<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1"><!--移动设备优先-->
	<title>处方违规</title>
	<style type="text/css">@import url("<c:url value="/css/lib/bootstrap.min.css"/>");</style>
	<style type="text/css">@import url("<c:url value="/css/lib/V2.0/weknow.css"/>");</style>
	<style type="text/css">@import url("<c:url value="/css/lib/font-awesome.min.css"/>");</style>
	<style type="text/css">@import url("<c:url value="/plugins/jquery-ui/jquery-ui.min.css"/>");</style>
	<!--
    -->
	<style type="text/css">@import url("<c:url value="css/pc/outpatient/outpatient_print.css?v1.0"/>");</style>
	<style type="text/css">@import url("<c:url value="/css/lib/boxImg.css"/>");</style>
	<link href="css/lib/bootstrap.min.css" rel="stylesheet" type="text/css"  media="print" />
	<link href="css/pc/outpatient/outpatient_print.css?v1.0" rel="stylesheet" type="text/css"  media="print" />

	<style type="text/css">
		.pointer{
			cursor:pointer;
		}
		.today-area{
			width:100%;
			height:150px;
			margin-bottom: 15px;
			overflow-y:auto;
		}

		before,after{
			opacity: .3;
			position: absolute;
			top: -5px;
			right: 0;
		}

		after{
			top: 5px;
		}

		.trA{
			color: #000000;
			position: relative;
			padding-right: 16px;
			cursor: pointer;
		}

	</style>
</head>
<body>
<!-- Preloader -->
<div class="animationload">
	<div class="loader">
		Loading...
	</div>
</div>
<!-- End Preloader -->
<input type="hidden" id="institutionId"/>
<input type="hidden" id="townId" value="${townId}">
<input type="hidden" id="status" value="${status}">
<%--		<input type="hidden" id="institutionName"/>--%>

<div class="container-fluid">
	<section id="today_data" class="input-toggle">
		<!--
        <div style="">
            <table class="table table-condensed table-hover" style=" margin-bottom: 0px;">
                <caption style="background-color: #cfe6ff;font-size: 20px;color: black;padding: 5px;">今日数据<a id="export" class="pointer" style="float:right;margin-right: 35px;">下载</a></caption>
               </table>

               <div class="today-area">
                   <table class="table table-condensed table-hover">
                       <tbody id="tbodySpecimenList">
                           <tr>
                               <td>处方过量</td>
                               <td>岛石镇安安康诊所</td>
                               <td>11：25：24</td>
                           </tr>
                       </tbody>
                   </table>
               </div>
        </div>
         -->

		<div class="">
			<div class="row">
				<div class="col-md-12">
					<div class="form-inline">
						<div class="form-group">
							日期
							<div class="input-group" >
								<input type="text" class="form-control my_date_control" style="ime-mode:active" maxlength="10" id="dtFrom" value="${dtFrom}" autocomplete="off">
							</div>

						</div>
						<div class="form-group">
							--
							<div class="input-group" >
								<input type="text" class="form-control my_date_control" style="ime-mode:active" maxlength="10" id="dtTo"  value="${dtTo}" autocomplete="off">
							</div>
						</div>


						<div class="form-group">
							状态
							<div class="input-group">
								<select id="registryStatus" class="form-control">
									<option value="9" <c:if test="${status eq '9'}"> selected="selected"</c:if>>全部</option>
									<option value="0" <c:if test="${status eq '0'}"> selected="selected"</c:if>>正常</option>
									<option value="-1" <c:if test="${status eq '-1'}"> selected="selected"</c:if>>异常</option>
								</select>
							</div>
						</div>

						<div class="form-group">
							医疗机构
							<div class="input-group">
								<input type="text" class="form-control" style="ime-mode:inactive" id="institutionName" name="institutionName" value="${institutionName}"
									   autocomplete="off">
							</div>
						</div>

						<div class="form-group">
							医疗机构类型
							<div class="input-group">
								<select name="institutionTypeFirstScreen" class="form-control">
									<option value="">全部</option>
									<c:forEach var="a" items="${typeFirstList}">
										<option value="${a.value}">${a.fullName}</option>
									</c:forEach>
								</select>
							</div>
						</div>

						<div class="form-group">
							类别
							<div class="input-group">
								<select id="prescriptionType" class="form-control">
									<option value="9">全部</option>
									<optgroup style="color: cornflowerblue" label='———————— 基础类 ————————'></optgroup>
									<option value="820001,820002">无处方权开具处方</option>
									<option value="810003">非医师本人使用账号填写医疗文书</option>
									<c:forEach var="a" items="${violationMessageList}">
										<option value="${a.msgId}">${a.title}</option>
									</c:forEach>
									<optgroup style="color: #102552" label='———————— 个性化 ————————'></optgroup>
									<option value="820007">医美机构开展未备案项目</option>
									<option value="820008">未取得主诊医师资质开展医疗美容服务</option>
									<option value="810009">违规开具疫情防控相关药品</option>
									<option value="840001,840002,840003,840004,840005,840006,840007,840008,840009,810004">未按规定开具药品处方</option>
									<option value="850002">中医诊所超范围诊疗</option>
									<option value="850003">中医医师超范围诊疗</option>
									<option value="850004">重复使用一次性医疗器械和耗材</option>
									<option value="850001">非医师本人行医</option>
									<option value="850006">无资质开展禁止限制类医疗新技术</option>
									<option value="850007">医师无放射诊疗权限</option>
									<option value="850008">机构无反射诊疗权限</option>
									<option value="850009">医疗机构篡改病例资料</option>
								</select>
							</div>
						</div>

						<div class="form-group">
							<div class="checkbox">
								<label>
									<input type="checkbox" id="onlyShowAppeal"> 只显示未申诉的机构
								</label>
							</div>
						</div>

						<div class="form-group">
							<div class="input-group">
								<button type="button" id="search" class="btn btn-primary"
										style="margin-left: 30px;width:90px;">搜索
								</button>
							</div>
						</div>

					</div>
				</div>
				<table class="table table-condensed table-hover table-bordered" id="dataTable">
					<thead class="bg-default">
					<tr>
						<th class="text-center" style="width:15%;">医疗机构</th>
						<th class="text-center" style="width:5%;">医疗机构类型</th>
						<th class="text-center" style="width:5%;">
							<span onclick="orderByNameNoTop1('dataTable',2,'int');"><span onclick="updateSort(this)" class="trA">病历数<before>▲</before><after>▼</after></span></span>
						</th>
						<th class="text-center" style="width:5%;">
							<span onclick="orderByNameNoTop1('dataTable',3,'int');"><span onclick="updateSort(this)" class="trA">处方数<before>▲</before><after>▼</after></span></span>
						</th>
						<th class="text-center" style="width:5%;">
							<span onclick="orderByNameNoTop1('dataTable',4,'int');"><span onclick="updateSort(this)" class="trA">违规次数<before>▲</before><after>▼</after></span></span>
						</th>
						<th class="text-center" style="width:5%;">状态</th>
						<th class="text-center" style="width:5%;">操作</th>
					</tr>

					</thead>
					<tbody id="tbodyViolateInstitutionList">
					<!-- 演示用HTML、实际项目会清空 -->
					<tr>
						<td>岛石镇安安康诊所</td>
						<td class="text-right">6</td>
						<td class="text-right">异常</td>
						<td class="text-center"><button class="btn btn-default btn-sm" name="showDetail">查看</button></td>
					</tr>
					</tbody>
				</table>
			</div>
	</section>

	<!--处方违规明细页面 -->
	<section id="today_data_detail" class="input-toggle" style="display:none;">
		<header style="border-bottom: 1px solid #F3F3F7; margin-bottom: 5px;">
			<div class="row">
				<div class="col-md-2">
					<h3 id="headTitle" style="margin-top: 10px; font-size: 20px;">
						<i class="fa fa-long-arrow-left" style="color: #c5c5c5; border-right:1px solid #c5c5c5;padding-right: 5px;" id="backToWorkspace"></i>
						<span style="margin-right:50px;">处方违规</span>
					</h3>
				</div>
				<div class="col-md-8 text-center">
					<h3 id="institution_name_dis">XX医疗机构</h3>
				</div>
			</div>
		</header>
		<div class="row">
			<div class="col-md-12">
				<div class="form-inline">
					<div class="form-group">
						类别
						<div class="input-group">
							<select id="msgId" class="form-control">
								<option value="9">全部</option>
								<optgroup style="color: cornflowerblue" label='———————— 基础类 ————————'></optgroup>
								<option value="820001,820002">无处方权开具处方</option>
								<option value="810003">非医师本人使用账号填写医疗文书</option>
								<c:forEach var="a" items="${violationMessageList}">
									<option value="${a.msgId}">${a.title}</option>
								</c:forEach>
								<optgroup style="color: #102552" label='———————— 个性化 ————————'></optgroup>
								<option value="820007">医美机构开展未备案项目</option>
								<option value="820008">未取得主诊医师资质开展医疗美容服务</option>
								<option value="810009">违规开具疫情防控相关药品</option>
								<option value="840001,840002,840003,840004,840005,840006,840007,840008,840009,810004">未按规定开具药品处方</option>
								<option value="850002">中医诊所超范围诊疗</option>
								<option value="850003">中医医师超范围诊疗</option>
								<option value="850004">重复使用一次性医疗器械和耗材</option>
								<option value="850001">非医师本人行医</option>
								<option value="850006">无资质开展禁止限制类医疗新技术</option>
								<option value="850007">医师无放射诊疗权限</option>
								<option value="850008">机构无反射诊疗权限</option>
								<option value="850009">医疗机构篡改病例资料</option>
							</select>
						</div>
					</div>


					<%--<div class="form-group">--%>
						<%--状态--%>
						<%--<div class="input-group">--%>
							<%--<select id="checkSt" class="form-control">--%>
								<%--<option value="9">全部</option>--%>
								<%--<option value="0">正常</option>--%>
								<%--<option value="-1">异常</option>--%>
							<%--</select>--%>
						<%--</div>--%>
					<%--</div>--%>
				</div>
			</div>
		</div>
		<table class="table table-condensed table-hover table-bordered" style="margin-top: 10px;">
			<thead class="bg-default" id="thead-prescription"></thead>
			<tbody id="tbody-prescription"></tbody>
		</table>
	</section>
</div>

<div class="modal fade" tabindex="-1" role="dialog" id="showImageModal">
	<div class="modal-dialog  modal-lg" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 id="imageModalTitle" class="modal-title"></h4>
			</div>
			<div class="modal-body">
				<div class="row" style="padding-left:0px;">
					<div class="col-xs-12">
						<table class="table table-condensed table-hover table-bordered">
							<tbody id="tbodyImageList">
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<div style="display: none;">
	<div id="printDiv">
		<!-- 药物处方单 不含附加费-->
		<div class="print-prescription drug-order">
			<div class="pill-top-info">
				<div class="clear">&nbsp;
					<!-- <div class="pill-number-tag fl">NO.<span class="pill-number acography-serial-no">LC8632012463</span></div> -->
					<div style="float: right;">
						<span class="this-page"></span><span>/</span><span class="all-page"></span>
					</div>
				</div>
				<h2 class="pill-title clinic-name"></h2>
				<p class="pill-subtitle"><c:if test="${type == 2 }"><span>西药<c:if test="${autoFlg.drWorkspaceWestTogetherFlg == 1 }">西药/成药</c:if></span></c:if><c:if test="${type == 4 }"><span>成药</span></c:if><span>处方</span></p>
				<div class="pill-detailInfo">
					<div class="healthCard-line clear">
						<span class="pill-detailInfo-title fl">医疗证/医保卡号：</span>
						<span class="patient-healthCard">-</span>
					</div>
					<ul class="pill-detailInfo-one clear list-inline">
						<li>
							<span class="pill-detailInfo-title fl">姓名：</span>
							<span class="patient-name" title=""></span>
						</li>
						<li>
							<span class="pill-detailInfo-title">性别：</span>
							<span class="patient-gender"></span>
						</li>
						<li>
							<span class="pill-detailInfo-title">年龄：</span>
							<span class="patient-age"></span>
						</li>
						<li class="dep">
							<span class="pill-detailInfo-title">科室：</span>
							<span class="department-name">-</span>
						</li>
						<li>
							<span class="pill-detailInfo-title">费别：</span>
							<span class="payment-type-name">自费</span>
						</li>
					</ul>
					<ul class="pill-detailInfo-two clear list-inline">
						<li>
							<span class="pill-detailInfo-title">病历号：</span>
							<span class="patient-no">-</span>
						</li>
						<li>
							<span class="pill-detailInfo-title">住址/电话：</span>
							<span class="living-address-countryside" title="-/-"><span class="patient-ad">-</span>/<span class="patient-phone">-</span></span>
						</li>
					</ul>
					<c:if test="${type == 2 }">
						<ul class="pill-detailInfo-three clear list-inline">
							<li style="width: 100%;">
								<span class="pill-detailInfo-title">临床诊断：</span>
								<span class="showDiagnose"><span class="diagnosis overflowEllipsis" style="max-width: 400px;">  - </span></span>
							</li>
						</ul>
					</c:if>
					<ul class="pill-detailInfo-three clear list-inline">
						<c:if test="${type == 4 }">
							<li>
								<span class="pill-detailInfo-title">临床诊断及证型：</span>
								<span class="showDiagnose"><span class="diagnosis overflowEllipsis">  - </span></span>
							</li>
						</c:if>
						<c:if test="${type == 2 }">
							<li>
								<span class="pill-detailInfo-title">过敏史：</span>
								<span class="showDiagnose"><span class="allergies overflowEllipsis" style="max-width: 280px;">  - </span></span>
							</li>
						</c:if>
						<li>
							<span class="pill-detailInfo-title">开具日期：</span>
							<span class="add-date"></span>
						</li>
					</ul>
				</div>
			</div>
			<div class="pill-middle-info">
				<p class="pill-list clear">
					<span class="pill-list-tag 4editnoshowweight fl" style="display: block;">Rp：</span>
				</p>
				<div class="pill-list-content">
					<ul class="dsn list-inline" style="display: block;">

					</ul>
				</div>
				<div class="pill-state-show">
					<!--以下空白-查看状态显示-->
					<p class="pill-list-hint dsn"><i>（以下空白）</i></p>
				</div>
			</div>

			<div class="already-importInfo" >
				<p class="text-right" style="width: 100%;${showMoneyStyle}">
					<span>处方总金额（元）：￥</span>
					<span class="total-money china-totalPrice" name="totalPrice"></span>
				</p>
			</div>
			<div class="pill-bottom-info">
				<div class="fillOut">
					<ul class="list-inline">
						<li><span>医师：</span><span class="underline"  style="display:inline-block;min-width: 80px;position: relative;"><span name="doctorName"></span></span></li>
						<li><span>审方药师：</span><span class="underline" style="display:inline-block;min-width: 50px;position: relative;top: 6px;"></span></li>
						<li><span>配药药师：</span><span class="underline" style="display:inline-block;min-width: 50px;position: relative;top: 6px;"></span></li>
						<li><span>发药药师：</span><span class="underline" style="display:inline-block;min-width: 50px;position: relative;top: 6px;"></span></li>
					</ul>
				</div>
			</div>
			<c:if test="${type == 4 }">
				<div style="font-size: 12px;position: absolute;bottom: 20px;padding-left: 25px;">
					<div>注:1、本处方当日有效</div>
					<div style="padding-left: 15px;">2、取药时请当面核对药品名称、规格、数量</div>
					<div style="padding-left: 15px;">3、延长处方用量时间原因: 慢性病、老年病、外地、其他</div>
				</div>
			</c:if>
		</div>

		<!-- 注射单 -->
		<div class="print-prescription inject-order " style="display: none;" >
			<div class="pill-top-info" style="height: 200px;">
				<div class="clear">&nbsp;
					<!-- <div class="pill-number-tag fl">NO.<span class="pill-number acography-serial-no">LC8632012463</span></div> -->
					<div style="float: right;">
						<span class="this-page">1</span><span>/</span><span class="all-page">4</span>
					</div>
				</div>
				<h2 class="pill-title clinic-name">${institutionName }</h2>
				<p class="pill-subtitle"><span>注射单</span></p>
				<div class="pill-detailInfo">
					<div class="healthCard-line clear">
						<span class="pill-detailInfo-title fl">医疗证/医保卡号：</span>
						<span class="patient-healthCard">-</span>
					</div>
					<ul class="pill-detailInfo-one clear list-inline">
						<li>
							<span class="pill-detailInfo-title fl">姓名：</span>
							<span class="patient-name" title=""></span>
						</li>
						<li>
							<span class="pill-detailInfo-title">性别：</span>
							<span class="patient-gender"></span>
						</li>
						<li>
							<span class="pill-detailInfo-title">年龄：</span>
							<span class="patient-age"></span>
						</li>
						<li class="dep">
							<span class="pill-detailInfo-title">科室：</span>
							<span class="department-name">-</span>
						</li>
						<li>
							<span class="pill-detailInfo-title">费别：</span>
							<span class="payment-type-name">自费</span>
						</li>
					</ul>
					<ul class="pill-detailInfo-two clear list-inline">
						<li>
							<span class="pill-detailInfo-title">病历号：</span>
							<span class="patient-no">-</span>
						</li>
						<li>
							<span class="pill-detailInfo-title">住址/电话：</span>
							<span class="living-address-countryside" title="-/-"><span class="patient-ad">-</span>/<span class="patient-phone">-</span></span>
						</li>
					</ul>
					<ul class="pill-detailInfo-three clear list-inline">
						<li>
							<span class="pill-detailInfo-title">过敏史：</span>
							<span class="showDiagnose"><span class="allergies overflowEllipsis"  style="max-width: 280px;">  - </span></span>
						</li>
						<li>
							<span class="pill-detailInfo-title">开具日期：</span>
							<span class="add-date"></span>
						</li>
					</ul>
				</div>
			</div>
			<div class="pill-middle-info">

				<div class="pill-list-content">
					<ul class="dsn list-inline" style="display: block;">
					</ul>
				</div>
				<div class="pill-state-show">
					<!--以下空白-查看状态显示-->
					<p class="pill-list-hint dsn"><i>（以下空白）</i></p>
				</div>
			</div>

			<div class="pill-inject-table">
				<div class="fillOut">
					<ul class="list-inline">
						<li style="width: 35%;"><span>医师：</span><span class="underline"  style="display:inline-block;min-width: 80px;position: relative;"><span name="doctorName"></span></span></li>
						<li style="width: 65%;text-align: right;"><span>打印时间：</span><span name="printTime"></span></li>
					</ul>
				</div>
				<table class="table" style="margin-bottom: 10px;">
					<tr>
						<td style="width: 9%;">皮试</td>
						<td colspan="10"></td>
					</tr>
					<tr>
						<td style="width: 9%;" rowspan="2">日期</td>
						<td style="width: 9%;" rowspan="2">核对签名</td>
						<td style="width: 9%;" rowspan="2">加药签名</td>
						<td colspan="2">注射</td>
						<td colspan="2">第二组接瓶</td>
						<td colspan="2">第三组接瓶</td>
						<td colspan="2">拔针</td>
					</tr>
					<tr>
						<td style="width: 9%;">时间</td>
						<td style="width: 9%;">签名</td>
						<td style="width: 9%;">时间</td>
						<td style="width: 9%;">签名</td>
						<td style="width: 9%;">时间</td>
						<td style="width: 9%;">签名</td>
						<td style="width: 9%;">时间</td>
						<td style="width: 9%;">签名</td>
					</tr>
					<tr>
						<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
					</tr>
					<tr>
						<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
					</tr>
					<tr>
						<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
					</tr>
					<tr>
						<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
					</tr>
					<tr>
						<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
					</tr>
					<tr>
						<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
					</tr>
				</table>
			</div>
			<div style="font-size: 12px;padding-left: 25px;">
				<div>注:1、凭此单输液，请妥善保管，按时注射。</div>
				<div style="padding-left: 15px;">2、输液时，护士已按要求调节输液速度，请不要擅自调节输液。输液期间请勿离开输液区，以防意外。</div>
			</div>
		</div>
	</div>
</div>

<script src="<c:url value="/js/lib/jquery.min.js"/>" type="text/javascript"></script>
<script src="<c:url value="/js/lib/bootstrap.min.js"/>" type="text/javascript"></script>
<script src="<c:url value="/plugins/jquery-ui/wn-jquery-ui.js"/>" type="text/javascript"></script>
<script src="<c:url value="/plugins/jquery.fileDownload.js"/>" type="text/javascript"></script>
<script src="<c:url value="/js/lib/string-format.js?V0.1"/>" type="text/javascript"></script>
<script src="<c:url value="/js/lib/number-format.js?V0.1"/>" type="text/javascript"></script>
<script src="<c:url value="/js/lib/weknow.js"/>" type="text/javascript"></script>
<script src="<c:url value="/js/lib/wn-validator.js"/>" type="text/javascript"></script>
<script src="<c:url value="/plugins/jquery-printarea/jquery.PrintArea.js?v0.0"/>" type="text/javascript"></script>
<!-- table排序js -->
<script src="<c:url value="/js/pc/util/sortUtil.js?V1.1"/>" type="text/javascript"></script>
<!-- 西药处方打印 -->
<script src="<c:url value="/js/pc/outpatient/outpatient_medical_prescription_west.js?V0.4"/>" type="text/javascript"></script>
<!-- 申诉处理 -->
<script src="<c:url value="/js/pc/appeal/appeal.js?${JsVersionProperties.prop.getProperty('appeal')}"/>"  type="text/javascript"></script>

<script src="<c:url value="/js/pc/show_img/show_img.js?${JsVersionProperties.prop.getProperty('show_img')}"/>"  type="text/javascript"></script>
<script src="<c:url value="/js/pc/prescription_violate/prescription_violate_com.js?V0.7.1"/>" type="text/javascript"></script>
<script src="<c:url value="/js/pc/prescription_violate/prescription_violate.js?V1.9.12"/>" type="text/javascript"></script>
</body>
</html>
